package com.itheima.ssm.dao;

import com.itheima.ssm.domain.Permission;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface IPermissionDao {
    @Select("select * from  permission p,role_permission r where p.id=r.permissionId AND r.roleId=#{roleId}" )

    public List<Permission> findById(String roleId);



    @Select("select * from permission")
    public List<Permission> findAll();


    @Insert("insert into permission(permissionName,url) values(#{permissionName},#{url})")
    public void save(Permission permission);
}
